
import 'dart:convert';

import 'package:ichinesereader/models/book/book.dart';

FolderBookListResult folderBookListResultFromJson(String str) => FolderBookListResult.fromJson(json.decode(str));

String folderBookListResultToJson(FolderBookListResult data) => json.encode(data.toJson());

class FolderBookListResult {
    FolderBookListResult({
        this.limit,
        this.page,
        this.count,
        this.list,
    });

    int? limit;
    int? page;
    int? count;
    List<Book>? list;

    factory FolderBookListResult.fromJson(Map<String, dynamic> json) => FolderBookListResult(
        limit: json["limit"],
        page: json["page"],
        count: json["count"],
        list: json["list"]!=null ? List<Book>.from(json["list"].map((x) => Book.fromJson(x))) : null,
    );

    Map<String, dynamic> toJson() => {
        "limit": limit,
        "page": page,
        "count": count,
        "list": list!=null ? List<dynamic>.from(list!.map((x) => x.toJson())) : null,
    };
}
